package com.chub.study.modules.controller;


import com.alibaba.fastjson2.JSONObject;
import com.chub.RespResult;
import com.chub.study.modules.mapper.TCityMapper;
import com.chub.study.modules.service.FileReceiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 文件处理 前端控制器
 * </p>
 *
 * @author chub
 * @since 2021-08-26
 */
//@RunWith(SpringRunner.class)
@Api(tags = "地区信息的服务")
@RestController
@RequestMapping("/modules")
public class FileProcessorController extends BaseController {

//    @Resource
    @Autowired(required = false)
    private TCityMapper cityMapper;

//    @Autowired(required = false)
    @Resource
    private FileReceiveService fileReceiveService;




    @ApiOperation(value = "文件处理")
    @PostMapping("/fileProcessor")
    public RespResult<String> fileProcessor(@ApiParam("城市Bean") @RequestBody JSONObject reqJson) {
        logger.info("文件处理入参 = {}", reqJson);

        return fileReceiveService.receiveFile(reqJson);


    }


}

